package cn.xopencode.recordservice.convert.lowroom;

import cn.xopencode.common.framework.vo.PageResult;
import cn.xopencode.recordservice.dal.mysql.dataobject.lowroom.LowRoomRecordDO;
import cn.xopencode.recordservice.dal.mysql.dataobject.lowroom.LowRoomRecordEmpRelDO;
import cn.xopencode.recordservice.rpc.lowroom.dto.LowRoomRecordCreateDTO;
import cn.xopencode.recordservice.rpc.lowroom.dto.LowRoomRecordDTO;
import cn.xopencode.recordservice.rpc.lowroom.dto.LowRoomRecordPageDTO;
import cn.xopencode.recordservice.rpc.lowroom.dto.LowRoomRecordUpdateDTO;
import cn.xopencode.recordservice.rpc.lowroom.vo.LowRoomRecordEmpRelVO;
import cn.xopencode.recordservice.rpc.lowroom.vo.LowRoomRecordPageVO;
import cn.xopencode.recordservice.rpc.lowroom.vo.LowRoomRecordUpdateVO;
import cn.xopencode.recordservice.rpc.lowroom.vo.LowRoomRecordVO;
import cn.xopencode.recordservice.service.lowroom.bo.LowRoomRecordBO;
import cn.xopencode.recordservice.service.lowroom.bo.LowRoomRecordCreateBO;
import cn.xopencode.recordservice.service.lowroom.bo.LowRoomRecordPageBO;
import cn.xopencode.recordservice.service.lowroom.bo.LowRoomRecordUpdateBO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface LowRoomRecordConvert {
    LowRoomRecordConvert INSTANCE = Mappers.getMapper(LowRoomRecordConvert.class);

    LowRoomRecordDO convert(LowRoomRecordCreateBO bean);

    LowRoomRecordUpdateVO convertUpdate(LowRoomRecordDO bean);

    LowRoomRecordCreateBO convert(LowRoomRecordCreateDTO bean);

    LowRoomRecordUpdateBO convert(LowRoomRecordUpdateDTO bean);

    LowRoomRecordDO convert(LowRoomRecordUpdateBO bean);

    LowRoomRecordBO convert(LowRoomRecordDTO bean);

    List<LowRoomRecordBO> convertList(List<LowRoomRecordDO> list);

    List<LowRoomRecordEmpRelVO> convert(List<LowRoomRecordEmpRelDO> doList);

    LowRoomRecordPageBO convert(LowRoomRecordPageDTO bean);

    List<LowRoomRecordVO> convertList02(List<LowRoomRecordBO> list);

    @Mapping(source = "records", target = "list")
    PageResult<LowRoomRecordPageVO> convertPage(IPage<LowRoomRecordDO> page);
}
